<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        /* 
            定义一个比较长的字符串
            const str1 = "This is a very long string which needs to wrap across multiple lines because otherwise my code is unreadable.This is a very long string which needs to wrap across multiple lines because otherwise my code is unreadable."
         */
        //方式一：为了代码观看方便，可以使用 + 号进行拼接 相当于字符串拼接
        const str1 = "This is a very long string which needs to wrap across multiple"+
        "lines because otherwise my code is unreadable.This is a very long string which needs to"+ 
        "wrap across multiple lines because otherwise my code is unreadable."
        console.log(str1);

        // 方式二：可以使用 \ 进行拼接 （推荐）在一个引号中相当于在一个字符串内进行拼接
        const str2 = "This is a very long string which needs to wrap across multiple\
lines because otherwise my code is unreadable.This is a very long string which\
needs to wrap across multiple lines because otherwise my code is unreadable."
        console.log(str2);

    </script>
</head>
<body>
    
</body>
</html>